#include "GlGuiEvent.h"

GlGuiEvent::GlGuiEvent (const GlGuiEvent & e) : GlEvent (e),
  _relatedActionChains (e._relatedActionChains),
  _pCauseEvent (e._pCauseEvent) {}



GlGuiEvent::GlGuiEvent (const GlEvent * pCauseEvent)
  : GlEvent (), _pCauseEvent (pCauseEvent) {}



void GlGuiEvent::registerActionChain (GlActionChain * pActionChain)
{
  _relatedActionChains.push_back (pActionChain);
}



void GlGuiEvent::doActions ()
{
  for (size_t i = 0; i < _relatedActionChains.size (); ++i)
  {
    _relatedActionChains[i]->performActions (*this);
  }
}

const GlEvent * GlGuiEvent::getCauseEvent () const
{
  return _pCauseEvent;
}

void GlGuiEvent::setCauseEvent (const GlEvent * pCauseEvent)
{
  _pCauseEvent = pCauseEvent;
}

